const fs=require('fs')
function getFile(filename){
    return new Promise((resolve,reject)=>{
        fs.readFile(filename,'utf8',(err,data)=>{resolve(data)})
    })
}
let f1=getFile('./text1.txt')
let f2=getFile('./text2.txt')
f2.then(data=>{
    f1.then(d2=>{
        console.log(d2);
        console.log(data);
    })
})